<?php
/*! \brief
 * This is WFSanitize class
 * This is the Class that manipulate Sanitize api
 * \author William Su
 */
class WFSanitize {
	/**
	 * @var WF
	 */
	private $objFramework;
	public function __construct($objFramework) {
	    $this->objFramework = $objFramework;
	}
	/**
	 *\brief Description
	 *  - check is user input is valnerability of directory traversal
	 *  @return boolean
	 */
	public function isDirectoryTraversal($strInput) {
	    $ret = false;
	    $strInput = htmlspecialchars_decode(urldecode($strInput));
	    //var_dump($strInput);
	    if(false !== strpos($strInput,"/") || false !== strpos($strInput,".") || false !== strpos($strInput,"\\")){
	        $ret = true;
	    }
	    return $ret;
	}
} 